package com.huawei.hms.common.data;

import android.database.CursorWindow;
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable.Creator;
import com.huawei.hms.common.internal.safeparcel.a;

public final class DataHolderCreator implements Creator<DataHolder> {
    public final DataHolder[] newArray(int i) {
        return new DataHolder[i];
    }

    public final DataHolder createFromParcel(Parcel parcel) {
        int i = 0;
        String[] strArr = null;
        int b = a.b(parcel);
        CursorWindow[] cursorWindowArr = null;
        Bundle bundle = null;
        int i2 = 0;
        while (parcel.dataPosition() < b) {
            int a = a.a(parcel);
            switch (a.a(a)) {
                case 1:
                    strArr = a.g(parcel, a);
                    break;
                case 2:
                    cursorWindowArr = (CursorWindow[]) a.a(parcel, a, CursorWindow.CREATOR);
                    break;
                case 3:
                    i2 = a.c(parcel, a);
                    break;
                case 4:
                    bundle = a.f(parcel, a);
                    break;
                case 1000:
                    i = a.c(parcel, a);
                    break;
                default:
                    a.b(parcel, a);
                    break;
            }
        }
        a.h(parcel, b);
        DataHolder dataHolder = new DataHolder(i, strArr, cursorWindowArr, i2, bundle);
        dataHolder.collectColumsAndCount();
        return dataHolder;
    }
}
